package com.gjintel.business.webadv.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "t_web_adv_info")
@SuppressWarnings("serial")
public class WebAdv implements Serializable {
	private String id;
	private String content;
	private String position;
	private String type;
	private String typename;
	private String positionname;
	private java.sql.Date startTime;
	private java.sql.Date endTime;
	private Integer times;
	private Date createTime;
	private Date updateTime;
	private String createrId;
	private String updaterId;
	private String createrName;
	private String updaterName;
	private Integer flag = 0;
	
	public WebAdv(){}
	
	public WebAdv(String id, String content,String position, String type,String typename,
	  String positionname, java.sql.Date startTime, java.sql.Date endTime,Integer times){
		this.id=id;
		this.content=content;
		this.position=position;
		this.type=type;
		this.typename=typename;
		this.positionname=positionname;
		this.startTime=startTime;
		this.endTime=endTime;
		this.times=times;
	}

	@Id
	@GeneratedValue(generator = "UIDGenerator")
	@GenericGenerator(name = "UIDGenerator", strategy = "org.hibernate.id.UUIDHexGenerator")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
   
	@Column(name = "CONTENT", insertable = true, updatable = true)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
    
	@Column(name = "POSITION", insertable = true, updatable = true)
	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}
	
    
	@Column(name = "TYPE", insertable = true, updatable = true)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "START_TIME", insertable = true, updatable = true)
	public java.sql.Date getStartTime() {
		return startTime;
	}

	public void setStartTime(java.sql.Date startTime) {
		this.startTime = startTime;
	}
    
	@Column(name = "END_TIME", insertable = true, updatable = true)
	public java.sql.Date getEndTime() {
		return endTime;
	}

	public void setEndTime(java.sql.Date  endTime) {
		this.endTime = endTime;
	}
   
	public Integer getTimes() {
		return times;
	}

	public void setTimes(Integer times) {
		this.times = times;
	}

	@Column(name = "CREATE_TIME", insertable = true, updatable = true)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "UPDATE_TIME", insertable = true, updatable = true)
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
    
	@Column(name = "CREATER_ID", insertable = true, updatable = true)
	public String getCreaterId() {
		return createrId;
	}

	public void setCreaterId(String createrId) {
		this.createrId = createrId;
	}

	@Column(name = "UPDATER_ID", insertable = true, updatable = true)
	public String getUpdaterId() {
		return updaterId;
	}

	public void setUpdaterId(String updaterId) {
		this.updaterId = updaterId;
	}
    
	@Column(name = "CREATER_NAME", insertable = true, updatable = true)
	public String getCreaterName() {
		return createrName;
	}

	public void setCreaterName(String createrName) {
		this.createrName = createrName;
	}

	@Column(name = "UPDATER_NAME", insertable = true, updatable = true)
	public String getUpdaterName() {
		return updaterName;
	}

	public void setUpdaterName(String updaterName) {
		this.updaterName = updaterName;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}
    
	@Transient
	public String getTypename() {
		return typename;
	}

	public void setTypename(String typename) {
		this.typename = typename;
	}
	
	@Transient
	public String getPositionname() {
		return positionname;
	}

	public void setPositionname(String positionname) {
		this.positionname = positionname;
	}

}
